//
//  MessageBubbleView.h
//  BaiTengIM
//
//  Created by awh on 2019/6/29.
//  Copyright © 2019 awh. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BTMessageModel.h"
NS_ASSUME_NONNULL_BEGIN

@protocol MessageBubbleViewDelegate;

@interface MessageBubbleView : UIImageView


@property (nonatomic, readonly) MessageDirection messageDirection;

@property (nonatomic, readonly) MessageType messageType;

@property (nonatomic, strong) BTMessageModel *model;

@property(nonatomic, weak) id<MessageBubbleViewDelegate> delegate;

- (instancetype)initWithDirection:(MessageDirection)messageDirection
                             type:(MessageType)messageType;

- (void)setupBubbleBackgroundImage;


@end

@protocol MessageBubbleViewDelegate <NSObject>

@optional

- (void)messageBubbleView:(MessageBubbleView *)bubbleView didClickURL:(NSString *)urlStr;

@end

NS_ASSUME_NONNULL_END
